3.4 \(\int \sinh (c+d x) (a+b \tanh ^2(c+d x)) \, dx\)

Optimal. Leaf size=25 \[ \frac{(a+b) \cosh (c+d x)}{d}+\frac{b \text{sech}(c+d x)}{d} \]

[Out]

((a + b)*Cosh[c + d*x])/d + (b*Sech[c + d*x])/d

________________________________________________________________________________________

Rubi [A]  time = 0.0320672, antiderivative size = 25, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 19, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.105, Rules used = {3664, 14} \[ \frac{(a+b) \cosh (c+d x)}{d}+\frac{b \text{sech}(c+d x)}{d} \]

Antiderivative was successfully verified.

[In]

Int[Sinh[c + d*x]*(a + b*Tanh[c + d*x]^2),x]

[Out]

((a + b)*Cosh[c + d*x])/d + (b*Sech[c + d*x])/d

Rule 3664

Int[sin[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]^2)^(p_.), x_Symbol] :> With[{ff = Free
Factors[Sec[e + f*x], x]}, Dist[1/(f*ff^m), Subst[Int[((-1 + ff^2*x^2)^((m - 1)/2)*(a - b + b*ff^2*x^2)^p)/x^(
m + 1), x], x, Sec[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, p}, x] && IntegerQ[(m - 1)/2]

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rubi steps

\begin{align*} \int \sinh (c+d x) \left (a+b \tanh ^2(c+d x)\right ) \, dx &=-\frac{\operatorname{Subst}\left (\int \frac{a+b-b x^2}{x^2} \, dx,x,\text{sech}(c+d x)\right )}{d}\\ &=-\frac{\operatorname{Subst}\left (\int \left (-b+\frac{a+b}{x^2}\right ) \, dx,x,\text{sech}(c+d x)\right )}{d}\\ &=\frac{(a+b) \cosh (c+d x)}{d}+\frac{b \text{sech}(c+d x)}{d}\\ \end{align*}

Mathematica [A]  time = 0.04502, size = 45, normalized size = 1.8 \[ \frac{a \sinh (c) \sinh (d x)}{d}+\frac{a \cosh (c) \cosh (d x)}{d}+\frac{b \cosh (c+d x)}{d}+\frac{b \text{sech}(c+d x)}{d} \]

Antiderivative was successfully verified.

[In]

Integrate[Sinh[c + d*x]*(a + b*Tanh[c + d*x]^2),x]

[Out]

(a*Cosh[c]*Cosh[d*x])/d + (b*Cosh[c + d*x])/d + (b*Sech[c + d*x])/d + (a*Sinh[c]*Sinh[d*x])/d

________________________________________________________________________________________

Maple [A]  time = 0.033, size = 43, normalized size = 1.7 \begin{align*}{\frac{1}{d} \left ( a\cosh \left ( dx+c \right ) +b \left ( -{\frac{ \left ( \sinh \left ( dx+c \right ) \right ) ^{2}}{\cosh \left ( dx+c \right ) }}+2\,\cosh \left ( dx+c \right ) \right ) \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sinh(d*x+c)*(a+b*tanh(d*x+c)^2),x)

[Out]

1/d*(a*cosh(d*x+c)+b*(-sinh(d*x+c)^2/cosh(d*x+c)+2*cosh(d*x+c)))

________________________________________________________________________________________

Maxima [B]  time = 1.1077, size = 90, normalized size = 3.6 \begin{align*} \frac{1}{2} \, b{\left (\frac{e^{\left (-d x - c\right )}}{d} + \frac{5 \, e^{\left (-2 \, d x - 2 \, c\right )} + 1}{d{\left (e^{\left (-d x - c\right )} + e^{\left (-3 \, d x - 3 \, c\right )}\right )}}\right )} + \frac{a \cosh \left (d x + c\right )}{d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sinh(d*x+c)*(a+b*tanh(d*x+c)^2),x, algorithm="maxima")

[Out]

1/2*b*(e^(-d*x - c)/d + (5*e^(-2*d*x - 2*c) + 1)/(d*(e^(-d*x - c) + e^(-3*d*x - 3*c)))) + a*cosh(d*x + c)/d

________________________________________________________________________________________

Fricas [A]  time = 1.90525, size = 115, normalized size = 4.6 \begin{align*} \frac{{\left (a + b\right )} \cosh \left (d x + c\right )^{2} +{\left (a + b\right )} \sinh \left (d x + c\right )^{2} + a + 3 \, b}{2 \, d \cosh \left (d x + c\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sinh(d*x+c)*(a+b*tanh(d*x+c)^2),x, algorithm="fricas")

[Out]

1/2*((a + b)*cosh(d*x + c)^2 + (a + b)*sinh(d*x + c)^2 + a + 3*b)/(d*cosh(d*x + c))

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (a + b \tanh ^{2}{\left (c + d x \right )}\right ) \sinh{\left (c + d x \right )}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sinh(d*x+c)*(a+b*tanh(d*x+c)**2),x)

[Out]

Integral((a + b*tanh(c + d*x)**2)*sinh(c + d*x), x)

________________________________________________________________________________________

Giac [B]  time = 1.20609, size = 107, normalized size = 4.28 \begin{align*} \frac{{\left (a e^{\left (d x + 6 \, c\right )} + b e^{\left (d x + 6 \, c\right )}\right )} e^{\left (-5 \, c\right )} + \frac{{\left (a e^{\left (2 \, d x + 2 \, c\right )} + 5 \, b e^{\left (2 \, d x + 2 \, c\right )} + a + b\right )} e^{\left (-c\right )}}{e^{\left (3 \, d x + 2 \, c\right )} + e^{\left (d x\right )}}}{2 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sinh(d*x+c)*(a+b*tanh(d*x+c)^2),x, algorithm="giac")

[Out]

1/2*((a*e^(d*x + 6*c) + b*e^(d*x + 6*c))*e^(-5*c) + (a*e^(2*d*x + 2*c) + 5*b*e^(2*d*x + 2*c) + a + b)*e^(-c)/(
e^(3*d*x + 2*c) + e^(d*x)))/d